Java Error Using Loops [migrated]

Posted by Shaun on Programmers See other posts from Programmers or by Shaun
Published on 2013-11-07T06:12:45Z Indexed on 2013/11/07 10:16 UTC
Read the original article Hit count: 197

Filed under:

I am facing a error in Java using the method Loops. I am a basic user learning Java and I am following a book with teaches you the basics of Java.

I have this problem when I use this code in my Java Program. It gives me an red line under my code. Here's my code:

public class Game{

    public static void main(String[] args){

    for (int dex = 0; dex < 1000; dex++) {
    if (dex % 12 == 0) {
          System.out.println(“#: “ + dex);
        }
       }
     }
    }

I have been following the tutorials correctly. I am a bit lost where I have gone or done wrong. I have my public static codes and such as you'd require in any Java programming.

Here's are the error given):

Cannot resolve method: 'Println(? , ?)'
Expression expected
',' or ')' expected
Unexpected Token
';' expected

© Programmers or respective owner

Related posts about java